import Vue from 'vue'
import Toast from './toast'
import Spin from './Spin'
import tabbar from './tabbar'

const components = {
  tabbar: tabbar
}

Vue.use({
  install: Vue => {
    Object.keys(components).forEach(key => {
      Vue.component(`w-${key}`, components[key])
    })
    Vue.prototype.$spin = window.$spin = Spin
    Vue.prototype.$toast = window.$toast = Toast
  }
})
